翻訳と辞書
Words near each other
・ Multi-fuel stove
・ Multi-function display
・ Multi-function printer
・ Multi-function structure
・ Multi-Functional Transport Satellite
・ Multi-gigabit transceiver
・ Multi-Gun
・ Multi-headed
・ Multi-Housing News
・ Multi-hyphenate
・ Multi-image
・ Multi-index notation
・ Multi-instrumentalist
・ Multi-jackbolt tensioner
・ Multi-junction solar cell
Multi-key quicksort
・ Multi-label classification
・ Multi-Lamellar Emulsion
・ Multi-lane free flow in Malaysia
・ Multi-layer CCD
・ Multi-layer insulation
・ Multi-leaded power package
・ Multi-level cell
・ Multi-level governance
・ Multi-level marketing
・ Multi-level technique
・ Multi-licensing
・ Multi-Line Extension telephone
・ Multi-link suspension
・ Multi-link trunking


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Multi-key quicksort : ウィキペディア英語版
Multi-key quicksort
Multi-key quicksort, also known as three-way radix quicksort, is an algorithm for sorting strings. This hybrid of quicksort and radix sort was originally suggested by P. Shackleton, as reported in one of C.A.R. Hoare's seminal papers on quicksort; its modern incarnation was developed by Jon Bentley and Robert Sedgewick in the mid-1990s. The algorithm is designed to exploit the property that in many problems, strings tend to have shared prefixes.
One of the algorithm's uses is the construction of suffix arrays, for which it was one of the fastest algorithms as of 2004.
==Description==
The three-way radix quicksort algorithm sorts an array of (pointers to) strings in lexicographic order. It is assumed that all strings are of equal length ; if the strings are of varying length, they must be padded with extra elements that are less-than any element in the strings. The pseudocode for the algorithm is then
algorithm sort(a : array of string, d : integer) is
if length(a) ≤ 1 or d ≥ K then
return
p := pivot(a, d)
i, j := partition(a, d, p) ''(Note a simultaneous assignment of two variables.)''
sort(a[0:i), d)
sort(a[i:j), d+1)
sort(a[j:length(a)), d)
The function must return a single character. Bentley and Sedgewick suggest either picking the median of or some random character in that range. The partition function is a variant of the one used in ordinary three-way quicksort: it rearranges so that all of have an element at position that is less than , have at position , and strings from onward have a 'th element larger than . (The original partitioning function suggested by Bentley and Sedgewick may be slow in the case of repeated elements; a Dutch national flag partitioning can be used to alleviate this.)
Practical implementations of multi-key quicksort can benefit from the same optimizations typically applied to quicksort: median-of-three pivoting, switching to insertion sort for small arrays, etc.

抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Multi-key quicksort」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.